package com.v5ent.service;

import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.v5ent.domain.vo.AccountVo;
import com.v5ent.interfaces.IAccountService;
import com.v5ent.entity.Account;
import com.v5ent.mapper.AccountMapper;
import com.v5ent.distribut.entities.TransactionLock;

@Service
public class AccountService implements IAccountService {
	@Autowired
	private AccountMapper accountMapper;

	@Transactional(readOnly = false)
	public int save(AccountVo account, TransactionLock transactionLock) {
		Account record = new Account();
		BeanUtils.copyProperties(account, record);
		int i = accountMapper.insert(record);
		return i;
	}
}
